//
//  BPPreviewViewController.m
//  BabyPhotograph
//
//  Created by cesh on 2017/1/13.
//  Copyright © 2017年 cesh. All rights reserved.
//

#import "BPPreviewViewController.h"

@interface BPPreviewViewController () <UIScrollViewDelegate>

@end

@implementation BPPreviewViewController


/**
 *  浏览图片
 *
 */
- (void)clickImage:(UITapGestureRecognizer *)tap
{
    XLPhotoBrowser *browser = [XLPhotoBrowser showPhotoBrowserWithCurrentImageIndex:tap.view.tag imageCount:self.images.count datasource:self];
    browser.browserStyle = XLPhotoBrowserStyleSimple;
}

#pragma mark    -   XLPhotoBrowserDatasource

- (UIImage *)photoBrowser:(XLPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index
{
    return self.images[index];
}

- (UIView *)photoBrowser:(XLPhotoBrowser *)browser sourceImageViewForIndex:(NSInteger)index
{
    return self.scrollView.subviews[index];
}

@end
